import Layout from '@/components/layout/index.vue'

export default [
  {
    name: 'overview',
    path: '/overview',
    redirect: '/overview/view',
    component: Layout,
    meta: {
      title: '数据概览',
      login: true,
      icon: 'overview'
    },
    children: [
      {
        name: 'view',
        path: 'view',
        component: () => import(/* webpackChunkName: 'workbench' */ '@/views/workbench/overview/view/index'),
        meta: {
          title: '数据概览',
          icon: 'overview',
          active: '/overview/view'
        }
      }
    ]
  },
  {
    name: 'permission',
    path: '/permission',
    redirect: '/permission/admin',
    component: Layout,
    meta: {
      title: '权限设置',
      login: true,
      icon: 'permission'
    },
    children: [
      {
        name: 'userList',
        path: 'userList',
        component: () => import(/* webpackChunkName: 'workbench' */ '@/views/workbench/permission/userList/index'),
        meta: {
          title: '管理员设置',
          icon: '',
          active: '/permission/userList'
        }
      },
      {
        name: 'userCreate',
        path: 'userCreate',
        component: () => import(/* webpackChunkName: 'workbench' */ '@/views/workbench/permission/userCreate/index'),
        meta: {
          title: '添加管理员',
          icon: '',
          hidden: true,
          active: '/permission/userList'
        }
      },
      {
        name: 'userEdit',
        path: 'userEdit',
        component: () => import(/* webpackChunkName: 'workbench' */ '@/views/workbench/permission/userEdit/index'),
        meta: {
          title: '修改管理员',
          icon: '',
          hidden: true,
          active: '/permission/userList'
        }
      },
      {
        name: 'roleList',
        path: 'roleList',
        component: () => import(/* webpackChunkName: 'workbench' */ '@/views/workbench/permission/roleList/index'),
        meta: {
          title: '角色设置',
          icon: '',
          active: '/permission/roleList'
        }
      },
      {
        name: 'roleCreate',
        path: 'roleCreate',
        component: () => import(/* webpackChunkName: 'workbench' */ '@/views/workbench/permission/roleCreate/index'),
        meta: {
          title: '添加角色',
          icon: '',
          hidden: true,
          active: '/permission/roleList'
        }
      },
      {
        name: 'logList',
        path: 'logList',
        component: () => import(/* webpackChunkName: 'workbench' */ '@/views/workbench/permission/logList/index'),
        meta: {
          title: '管理员日志',
          icon: '',
          active: '/permission/logList'
        }
      }
    ]
  }
]
